import 'package:flutter/material.dart';

/**
 * 首页导航：首页
 */
class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        children: [
          ElevatedButton(
              onPressed: () {
                Navigator.pushNamed(context, "/search");
              },
              child: Text("商品搜索")),
          ElevatedButton(
              onPressed: () {
                Navigator.pushNamed(context, "/product",
                    arguments: {"id": "test1"});
              },
              child: Text("商品详情")),
        ],
      ),
    );
  }
}
